from attr import dataclass


@dataclass
class TestingEnvironment:
    HOST = ("http://124.70.39.201/")
    USERNAME = "admin"
    PASSWORD = "Aa123456!"
    DB = {"host":'172.16.0.166',"port":3306,"user":'hxdamin',"password":'huaxin2017',"db":'xxy'}

@dataclass
class PreProduction:
    HOST = 'http://124.70.39.202/'

@dataclass
class DevEnvironment:
    HOST = ('http://124.70.39.203/')

ENV_MAP = {
    "测试环境":TestingEnvironment,
    "预发布环境": PreProduction,
    "开发环境": DevEnvironment
}

ENV_NAME = "测试环境"
ENV = ENV_MAP[ENV_NAME]()